package com.reggie.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.reggie.pojo.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface SetmealDao extends BaseMapper<Setmeal> {

    @Update("update setmeal set status = #{status} where id=#{id};")
    int updateStatusById(Integer status, Long id);

    @Select("select * from setmeal where category_id = #{id} and status=#{status};")
    List<Setmeal> selectByCategoryId(Long id,Integer status);


}
